package com.springWebFlux.config;

import javafx.application.Application;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.reactive.DispatcherHandler;
import org.springframework.web.reactive.config.EnableWebFlux;
import org.springframework.web.server.WebHandler;

/**
 * @version V1.0  </br>
 * @ClassName WebFluxConfig </br>
 * @Description TODO  </br>
 * @Author tonywang</br>
 * @DATE 3/20/2019 2:53 PM</br>
 */
@Configuration
@ComponentScan("com.springWebFlux")
@EnableWebFlux
public class WebFluxConfig {
    @Bean
    public WebHandler webHandler(ApplicationContext pApplicationContext) {
        DispatcherHandler handler = new DispatcherHandler(pApplicationContext);
        return handler;
    }
}
